<div style="padding:10px; float:right;">

  <% case order.aasm_state %>
  <% when "order_placed" %>
    <%= link_to("取消订单",
                cancel_admin_order_path(order),
                class: "btn btn-default btn-sm", method: :post) %>

  <% when "paid" %>
    <%= link_to("取消订单",
                cancel_admin_order_path(order),
                class: "btn btn-default btn-sm", method: :post) %>
    <%= link_to("出货",
                ship_admin_order_path(order),
                class: "btn btn-default btn-sm", method: :post) %>

  <% when "shipping" %>
    <%= link_to("设为已出货",
                shipped_admin_order_path(order),
                class: "btn btn-default btn-sm", method: :post) %>

  <% when "shipped" %>
    <%= link_to("退货",
                return_admin_order_path(order),
                class: "btn btn-default btn-sm", method: :post) %>

  <% when "order_cancelled" %>
    <span class="label label-default">订单已取消</span>

  <% when "good_returned" %>
    <span class="label label-default">已退货</span>

  <% end %>

</div>
